﻿using UnityEditor;
using UnityEngine;

namespace Yoozoo.Gameplay.Liberty.PlayerController.Editor
{
    [CustomEditor(typeof(PlayerVehicleBehaviourMgr))]
    public class PlayerVehicleBehaviourMgrEditor : UnityEditor.Editor
    {
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            PlayerVehicleBehaviourMgr vehicleBehaviourMgr = target as PlayerVehicleBehaviourMgr;
            
            if (GUILayout.Button("GotoLeftDoor"))
            {
                vehicleBehaviourMgr.SetCarEntity(vehicleBehaviourMgr.carEntity);
                vehicleBehaviourMgr.Nav2Door(CarDoorDirection.LeftCarDoor);
            }
            
            if (GUILayout.Button("GotoRightDoor"))
            {
                vehicleBehaviourMgr.SetCarEntity(vehicleBehaviourMgr.carEntity);
                vehicleBehaviourMgr.Nav2Door(CarDoorDirection.RightCarDoor);
            }
        }
    }
}